import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        Scanner in=new Scanner(System.in);
        while(in.hasNextLine()) {
            String str=in.nextLine();
            TreeNode root=binaryTree.createBinaryTree(str);
            System.out.println("=======层序遍历======");
//            binaryTree.preOrder(root);
            binaryTree.levelOrder(root);

            System.out.println("=======判断一棵树是否为完全二叉树======");
            System.out.println(binaryTree.isCompleteTree(root));
        }


    }
}
